package gui;

import javax.swing.JPanel;

import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.RowSpec;
import com.jgoodies.forms.factories.FormFactory;

import javax.swing.JScrollPane;
import javax.swing.JEditorPane;
import javax.swing.JButton;
import javax.swing.UIManager;
import javax.swing.text.html.HTMLEditorKit;
import javax.swing.text.html.StyleSheet;

import java.awt.Font;

public class AppDetailsNote extends JPanel {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 3532086094480804100L;
	public static JScrollPane scrollNoteList = new JScrollPane();
	private final JPanel panel_1 = new JPanel();
	public static JButton btnNoteCreate = new JButton("New Note");
	public static JButton btnNoteDelete = new JButton("Delete Note");
	public static JEditorPane txtDesc = new JEditorPane();
	public static JPanel imagePanel = new JPanel();
	public static  JScrollPane scrollPane = new JScrollPane();
	
	
	/**
	 * Create the panel.
	 */
	public AppDetailsNote() {
		setBackground(UIManager.getColor("Button.background"));
		setLayout(new FormLayout(new ColumnSpec[] {
				ColumnSpec.decode("128px:grow"),},
			new RowSpec[] {
				FormFactory.RELATED_GAP_ROWSPEC,
				RowSpec.decode("max(75px;default)"),
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,
				RowSpec.decode("default:grow"),
				FormFactory.RELATED_GAP_ROWSPEC,
				RowSpec.decode("min(200px;default)"),}));
		scrollNoteList.setViewportBorder(null);
		
		
		add(scrollNoteList, "1, 2, fill, fill");
		
		add(panel_1, "1, 4, left, fill");
		
		panel_1.add(btnNoteCreate);
		
		panel_1.add(btnNoteDelete);
		scrollPane.setViewportBorder(null);
		add(scrollPane, "1, 6, fill, fill");
		txtDesc.setFont(new Font("Gill Sans MT", txtDesc.getFont().getStyle(), txtDesc.getFont().getSize()));
		txtDesc.setBackground(UIManager.getColor("Button.background"));
		txtDesc.setContentType("text/html");
		HTMLEditorKit kit = new HTMLEditorKit();
		txtDesc.setEditorKit(kit);
		txtDesc.setVisible(false);
		StyleSheet styleSheet = kit.getStyleSheet();
		styleSheet.addRule("body{font-family: Lucida Sans Unicode, Lucida Grande, arial, helvetica, sans-serif; font-size: small; }");
		scrollPane.setViewportView(txtDesc);
		add(imagePanel, "1, 8");

	}
}
